﻿<div class="box onethird floatleft">
    <h3>
        Your top ten apps in the last 7 days <a href="#" class="toggle">Toggle</a></h3>
    <div class="box-content">
        @if (ViewBag.TopTen.Length > 0)
        {
                          
            <ul class="relative">
                @foreach (dynamic t in ViewBag.TopTen)
                {

                    <li><a href="#">@String.Format("{0:hh\\:mm\\:ss}", t.ElapsedTime)</a>
                        <p>
                            @Html.ActionLink((string)t.ApplicationName, "App", "Stats", new { id = t.ApplicationName.ToString().TrimEnd().Replace(" ", "-") }, null)
                        </p>
                    </li>
                 }
            </ul>
       }
        else
        {
            <h2>No Stats</h2>
            <p>
                To learn how to collect stats, <a href="/Home/Tour">visit the tour here. </a>
            </p>
           <p>
                You can download the productivity 
                <a href="@ViewBag.StartStopDownloadLink">
                stats collector here
                </a>
           </p>
        }
    </div>
    <!-- /box-content -->
    @Html.RouteLink("ViewAll", "Top", new { controller = "Top", action = "Apps", id = @Model.UserName, id2 = 7 }, new { Class = "view-all" })
</div>
<!-- /box -->
